package com.jeesite.modules.fl.entity;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;

@Table(name = "fl_enterprise", alias = "a", columns = {
        @Column(name = "id", attrName = "id", label = "id", isPK = true),
        @Column(name = "name", attrName = "name", label = "企业名称", queryType = QueryType.LIKE),
        @Column(name = "en_name", attrName = "enName", label = "英文名称"),
        @Column(name = "contact", attrName = "contact", label = "联系人", queryType = QueryType.LIKE),
        @Column(name = "cellphone", attrName = "cellphone", label = "手机"),
        @Column(name = "email", attrName = "email", label = "邮箱"),
        @Column(name = "expiry_date", attrName = "expiryDate", label = "有效期"),
        @Column(includeEntity = DataEntity.class),
}, orderBy = "a.update_date DESC"
)
public class Enterprise extends DataEntity<Enterprise>{
	private static final long serialVersionUID = 1L;
	
	private String name;
	private String contact;
	private String cellphone;
	private String email;
	private Date expiryDate;
	private String enName;
	
	public Enterprise(){
		super();
	}
	
	public Enterprise(String id){
		super(id);
	}

	@ExcelField(title="企业名称", sort=1)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@ExcelField(title="联系人", sort=2)
	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	@ExcelField(title="手机", sort=3)
	public String getCellphone() {
		return cellphone;
	}

	public void setCellphone(String cellphone) {
		this.cellphone = cellphone;
	}

	@ExcelField(title="邮箱", sort=4)
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@JsonFormat(pattern = "yyyy-MM-dd")
	@ExcelField(title="有效期", sort=5, dataFormat="yyyy-MM-dd")
	public Date getExpiryDate() {
		return expiryDate;
	}

	public void setExpiryDate(Date expiryDate) {
		this.expiryDate = expiryDate;
	}

	public String getEnName() {
		return enName;
	}

	public void setEnName(String enName) {
		this.enName = enName;
	}
	
}
